Timm Bäder [Sat, 28 Jan 2017 07:11:14 +0000 (08:11 +0100)]
togglebutton: Move :inconsistent to GtkCheckButton
Timm Bäder [Fri, 27 Jan 2017 11:02:47 +0000 (12:02 +0100)]
togglebutton: Move :draw-indicator property to GtkCheckButton
It's not used in GtkToggleButton at all, only in GtkCheckButton and
GtkRadioButton.
Timm Bäder [Fri, 27 Jan 2017 10:16:03 +0000 (11:16 +0100)]
checkbutton: Remove unused vfunc
Timm Bäder [Fri, 27 Jan 2017 10:07:41 +0000 (11:07 +0100)]
checkbutton: Remove unused function prototype
Timm Bäder [Thu, 26 Jan 2017 17:58:10 +0000 (18:58 +0100)]
widget: Remove gtk_widget_class_list_style_properties
Unused.
Timm Bäder [Sat, 28 Jan 2017 17:24:30 +0000 (18:24 +0100)]
gtkbuilder: Remove unused struct
Timm Bäder [Thu, 26 Jan 2017 12:31:56 +0000 (13:31 +0100)]
build: Stop compressing ui files
It's slower at runtime. Instead, strip blanks.
William Hua [Sun, 29 Jan 2017 16:24:43 +0000 (11:24 -0500)]
mir: handle surface placement events
This allows the Mir backend to properly emit "moved-to-rect."
William Hua [Fri, 27 Jan 2017 19:46:10 +0000 (14:46 -0500)]
mir: use mir_surface_spec_set_placement for menus
This API was added to Mir for GTK menus, combo boxes, etc.
Fran Dieguez [Sun, 29 Jan 2017 19:59:21 +0000 (19:59 +0000)]
Update Galician translation
Fran Dieguez [Sun, 29 Jan 2017 19:48:13 +0000 (19:48 +0000)]
Update Galician translation
Dušan Kazik [Sun, 29 Jan 2017 09:32:03 +0000 (09:32 +0000)]
Update Slovak translation
Dušan Kazik [Sun, 29 Jan 2017 09:30:05 +0000 (09:30 +0000)]
Update Slovak translation
Daniel Boles [Sat, 28 Jan 2017 20:21:56 +0000 (20:21 +0000)]
Remove tests/testtreemenu
Since GtkTreeMenu became a private class only used by GtkComboBox, all
this test actually did was to show a ComboBox constructed with a custom
CellArea. Now that the latter is no longer possible, the test just shows
a handful of settings that do nothing. Just test GtkComboBox directly.
Piotr Drąg [Sat, 28 Jan 2017 00:10:12 +0000 (01:10 +0100)]
Fix translator comments
They need to be exactly one line above a string to show up in .po files.
Michael Catanzaro [Fri, 27 Jan 2017 14:54:24 +0000 (08:54 -0600)]
Revert "notebook: redraw arrows after closing a tab"
This reverts commit
218beb2ef49d407b547047693605328c10d4877d.
Carlos Garnacho [Wed, 25 Jan 2017 14:53:55 +0000 (15:53 +0100)]
wayland: Ensure to set gtk_surface dbus properties after hide()
Currently hiding destroys the wl_surface and all related interfaces,
(including the gtk_surface1) so the next time the GdkWindow is mapped,
we don't bother to set the DBus properties. Toggle the check off so
it's actually issued again after the GdkWindow gets a gtk_surface1.
https://bugzilla.gnome.org/show_bug.cgi?id=773686
Baurzhan Muftakhidinov [Wed, 25 Jan 2017 09:11:28 +0000 (09:11 +0000)]
Update Kazakh translation
Baurzhan Muftakhidinov [Wed, 25 Jan 2017 09:08:46 +0000 (09:08 +0000)]
Update Kazakh translation
Michael Catanzaro [Sat, 21 Jan 2017 02:19:56 +0000 (20:19 -0600)]
notebook: redraw arrows after closing a tab
https://bugzilla.gnome.org/show_bug.cgi?id=777547
Mario Blättermann [Tue, 24 Jan 2017 13:32:48 +0000 (13:32 +0000)]
Update German translation
Timm Bäder [Sun, 22 Jan 2017 14:01:53 +0000 (15:01 +0100)]
widget: Remove gtk_widget_get_preferred_size mention from docs
Mention gtk_widget_measure instead.
Timm Bäder [Sun, 22 Jan 2017 14:01:40 +0000 (15:01 +0100)]
flowbox: Measure child widget sizes using gtk_widget_measure
Timm Bäder [Sun, 22 Jan 2017 13:48:28 +0000 (14:48 +0100)]
widget: Remove warning about already visible widgets
That was just added by mistake of course.
Timm Bäder [Sun, 22 Jan 2017 13:37:56 +0000 (14:37 +0100)]
Remove unnecessary gtk_widget_show calls
Timm Bäder [Sat, 21 Jan 2017 07:45:44 +0000 (08:45 +0100)]
gtkfontbutton: hexpand the font label
To restore the previous look.
Daniel Boles [Sat, 21 Jan 2017 22:43:35 +0000 (22:43 +0000)]
3to4: Fix typo in previous commit
Daniel Boles [Sat, 21 Jan 2017 22:39:06 +0000 (22:39 +0000)]
3to4: Fix suggested replacements for border-width
The new CSS border-spacing does what Grid::(row|column)_spacing and
Box::spacing already did, i.e. controlling the space added between child
widgets, so it’s not a replacement for Container::border-width.
Daniel Boles [Sat, 21 Jan 2017 20:40:21 +0000 (20:40 +0000)]
combobox: Stop pointlessly NULL-checking the menu
We now have a valid menu to use at all times.
Daniel Boles [Sat, 21 Jan 2017 20:23:27 +0000 (20:23 +0000)]
combobox: Move area and menu to .ui file
Now that priv->area is guaranteed to be constructed by us, and not
passed in by a user, we can move it to the .ui file and stop manually
managing its lifetime altogether. And once the area is there, we can
move the menu there too (and stop pointlessly destroying/rebuilding it).
Daniel Boles [Sat, 21 Jan 2017 12:54:49 +0000 (12:54 +0000)]
combobox: Remove property cell-area
The CellArea is going to become a pure implementation detail & be moved
to the .ui, instead of letting users mess with it (if anyone ever did).
Daniel Boles [Sat, 21 Jan 2017 15:11:40 +0000 (15:11 +0000)]
combobox: Reuse code rather than reimplementing it
We already have cell_layout_is_sensitive() to get whether at least one
cell in a Layout is sensitive, which we need because CellLayout/View
do not implement foreach(). So, since we wrote that, we can use it to
check our CellArea too, instead of doing foreach with a custom callback.
Daniel Boles [Sat, 21 Jan 2017 14:44:30 +0000 (14:44 +0000)]
combobox: some code cleanups
* Merge adjacent if statements with the same condition
* Add a space between a function and its declaration
Daniel Boles [Sat, 21 Jan 2017 18:53:38 +0000 (18:53 +0000)]
menushell: Fix select_last() to get last, not 1st
It was broken in the same way as select_first(), as explained in
commit
a5211adb225172195d6778d652b58632c38afcbf
Daniel Boles [Sat, 21 Jan 2017 16:10:32 +0000 (16:10 +0000)]
combobox: Fix documentation typo bx => box
Daniel Boles [Sat, 21 Jan 2017 15:50:54 +0000 (15:50 +0000)]
menushell: Make select_first() do that, not last…
It was looping over all items, not breaking out when it found the first
selectable one, and then selecting the _last_ selectable one (if any)
found. So, it did exactly the opposite of its name. This made me quite
baffled when opening a submenu with right-arrow put me at its last item.
Originally, the loop set to_select and broke if the current item was
selectable and not tear-off, meaning that it would correctly select the
first suitable item. However, when tear-off functionality was removed
in commit
4ed9452e9028bb90589474783cebac57ab66e2c9, so was the break.
Piotr Drąg [Fri, 20 Jan 2017 22:47:04 +0000 (23:47 +0100)]
Update Polish translation
Piotr Drąg [Fri, 20 Jan 2017 22:46:38 +0000 (23:46 +0100)]
Fix CSS spelling in a translatable string
Daniel Boles [Fri, 20 Jan 2017 22:15:42 +0000 (22:15 +0000)]
menushell: Don’t dereference before typechecking
Piotr Drąg [Fri, 20 Jan 2017 21:11:22 +0000 (22:11 +0100)]
Update POTFILES.in and POTFILES.skip
Daniel Boles [Fri, 20 Jan 2017 20:43:19 +0000 (20:43 +0000)]
combobox: If typechecking, don’t reference before
Timm Bäder [Fri, 20 Jan 2017 09:37:29 +0000 (10:37 +0100)]
Don't hide windows and popovers in init()
Instead, don't make them visible in gtk_widget_init in the first place.
Timm Bäder [Thu, 19 Jan 2017 19:15:43 +0000 (20:15 +0100)]
fontbutton: Be a GtkWidget
Timm Bäder [Thu, 19 Jan 2017 14:02:59 +0000 (15:02 +0100)]
assistant: Don't forget to remove child widgets
Timm Bäder [Thu, 19 Jan 2017 13:37:51 +0000 (14:37 +0100)]
toolitemgroup: Properly remove internal child widget
We now need to use gtk_widget_unparent and can't just destroy it.
Timm Bäder [Thu, 19 Jan 2017 13:34:42 +0000 (14:34 +0100)]
popovermenu: Remove forall implementation
Timm Bäder [Thu, 19 Jan 2017 11:30:23 +0000 (12:30 +0100)]
button: Don't explicitly show child widgets
Timm Bäder [Thu, 19 Jan 2017 11:26:56 +0000 (12:26 +0100)]
recorder: Adapt to widget visibility changes
We now need to explicitly hide the details label.
Timm Bäder [Thu, 19 Jan 2017 10:00:30 +0000 (11:00 +0100)]
Fix some widget visibility fallout
Timm Bäder [Thu, 19 Jan 2017 09:31:03 +0000 (10:31 +0100)]
widget: Remove show-all property
Doesn't make sense anymore now that gtk_widget_show_all is gone.
Timm Bäder [Thu, 19 Jan 2017 09:02:04 +0000 (10:02 +0100)]
Remove gtk_widget_show_all
Timm Bäder [Thu, 19 Jan 2017 07:50:37 +0000 (08:50 +0100)]
widget: Remove show_all vfunc
Timm Bäder [Wed, 18 Jan 2017 21:21:42 +0000 (22:21 +0100)]
filechooserbutton: Be a GtkWidget
Instead of subclassing GtkBox to have 2 child widgets, subclass
GtkWidget and only render one of them.
Timm Bäder [Mon, 16 Jan 2017 17:47:31 +0000 (18:47 +0100)]
sizerequest: Use gtk_widget_measure to measure widget sizes
Timm Bäder [Sat, 14 Jan 2017 09:08:53 +0000 (10:08 +0100)]
gtkbuilder: Improve error messages
Timm Bäder [Thu, 12 Jan 2017 16:13:19 +0000 (17:13 +0100)]
shortcutswindow: Unset search_bar in dispose
And check for null-ness in unmap. This prevents a crash when the window
is first disposed and then unmapped.
Timm Bäder [Thu, 12 Jan 2017 12:10:14 +0000 (13:10 +0100)]
shortcutswindow: Use GtkButton:icon-name for search button
Timm Bäder [Thu, 12 Jan 2017 11:59:06 +0000 (12:59 +0100)]
shortcutsshortcut: Be a GtkWidget
Instead of subclassing GtkBox and overriding _add to not work, subclass
GtkWidget and add a normal GtkBox as a child widget.
Timm Bäder [Thu, 12 Jan 2017 10:26:55 +0000 (11:26 +0100)]
gtkshortcutswindow: Adapt to GtkWidget visibility changes
Timm Bäder [Thu, 12 Jan 2017 09:12:31 +0000 (10:12 +0100)]
widget-factory: Remove some gtk3-widget-factory leftovers
Timm Bäder [Thu, 12 Jan 2017 09:04:35 +0000 (10:04 +0100)]
filechooser: adapt to GtkWidget:visible changes
Timm Bäder [Thu, 12 Jan 2017 08:47:50 +0000 (09:47 +0100)]
widget-factory: Adapt to GtkWidget visibility changes
Make the infobar and the toolbar invisible by default and remove all the
lines showing the other widgets.
Timm Bäder [Thu, 12 Jan 2017 08:43:45 +0000 (09:43 +0100)]
coloreditor: Hide overlay boxes
Timm Bäder [Thu, 12 Jan 2017 08:43:17 +0000 (09:43 +0100)]
Hide popovers and toplevels by default
Timm Bäder [Thu, 12 Jan 2017 08:29:59 +0000 (09:29 +0100)]
widget: Be visible by default
Daniel Boles [Fri, 20 Jan 2017 03:30:36 +0000 (03:30 +0000)]
combobox: popdown() the menu during unmap()
combo_box_popdown() currently skips popping down our menu if it is NULL.
But the required call to this at end-of-life was in destroy(), by which
point dispose() already NULLed the menu, so Menu::popdown() would never
run, even if it should. Fix this by trying popdown() earlier in unmap().
Also, add a converse assurance that we don’t popup() while not mapped.
Even once we remove all the now-pointless NULL checks, destroy() was the
wrong place to call combo_box_popdown(), and unmap() is the right place.
Carlos Garnacho [Fri, 20 Jan 2017 13:04:29 +0000 (14:04 +0100)]
Revert "wayland: Push NULL buffer when hiding a GdkWindow"
This reverts commit
6beb0b91c91dd4a018b0fe2c39f5687a00938821.
Mandy Wang [Fri, 20 Jan 2017 12:37:01 +0000 (20:37 +0800)]
update zh_CN translation
Chun-wei Fan [Fri, 20 Jan 2017 10:38:53 +0000 (18:38 +0800)]
gtkmain: Fix build on Windows
gtk_init() removed its support for supporting arguments, so we ought to do
likewise for Windows, which actually defines items that call gtk_init()
the old way (and also get rid of argument support in those functions,
since the direction is to not support them).
https://bugzilla.gnome.org/show_bug.cgi?id=773299
Chun-wei Fan [Fri, 20 Jan 2017 10:35:52 +0000 (18:35 +0800)]
Visual Studio builds: Update GSK project
Another GSK Vulkan renderer source was added for the build, so include it
here.
Benjamin Otte [Wed, 18 Jan 2017 21:41:20 +0000 (22:41 +0100)]
gtk: Register GSK resources at startup
That way they show up in the resource list in the inspector even when
running with the Cairo renderer.
Daniel Boles [Thu, 19 Jan 2017 22:28:41 +0000 (22:28 +0000)]
combobox: Remove dead code & unneeded type checks
Commit
fdc0c6426b6fb751653f3a8536a344f69a6407ac removed the appears-as-
list style property, & hence the ability to put the ComboBox into list
mode – but it left behind a pile of hijinks that were only used in said
mode & so were now doing absolutely nothing. This commit deletes those.
While doing that, I got carried away…so this also stops pointlessly type
checking popup_widget, as that can never be anything but a GtkTreeMenu.
It still checks for NULL everywhere, which shouldn’t be needed, but (A)
this commit is already too big, & (B) simply removing such checks where
they _seem_ unnecessary causes bad times. I’ll puzzle through that later
Daniel Boles [Thu, 19 Jan 2017 21:51:22 +0000 (21:51 +0000)]
testcombo—Don’t set appears-as-list style property
List mode no longer exists, so this had no effect.
Daniel Boles [Thu, 19 Jan 2017 21:23:51 +0000 (21:23 +0000)]
combobox: Make wrap-width and grid mode work again
Commit
fdc0c6426b6fb751653f3a8536a344f69a6407ac for removing (partly!)
appears-as-list also deleted the code that propagated wrap-width to the
TreeMenu and thus put us into “grid mode”. This restores that code.
And as Benjamin noted, calling check_appearance() here is wrong, so bye.
Matthias Clasen [Thu, 19 Jan 2017 18:52:52 +0000 (13:52 -0500)]
Add a section about initialization to the migration guide
Just the facts.
Matthias Clasen [Wed, 28 Dec 2016 13:53:22 +0000 (08:53 -0500)]
Update callers
Adapt all our tests and examples to the new initialization api.
Matthias Clasen [Wed, 28 Dec 2016 21:39:22 +0000 (16:39 -0500)]
Drop gdk init api
Supporting separately initialized gdk is just not worth it.
Matthias Clasen [Wed, 28 Dec 2016 13:49:37 +0000 (08:49 -0500)]
Drop arguments from gtk_init
This is our ultimate goal: no more commandline argument handling.
Lots of callers will have to be updated.
Matthias Clasen [Wed, 28 Dec 2016 12:46:56 +0000 (07:46 -0500)]
Simplify initialization code
Now that gtk_get_option_group and gtk_parse_args are no longer
public, we can get rid of them.
Matthias Clasen [Tue, 27 Dec 2016 23:49:30 +0000 (18:49 -0500)]
Drop the --gtk-debug and --gtk-no-debug options
We have environment variables that cover this.
Matthias Clasen [Tue, 27 Dec 2016 23:48:02 +0000 (18:48 -0500)]
Drop the --g-fatal-warnings argument
We don't need it, GLib has an environment variable for this.
Matthias Clasen [Tue, 27 Dec 2016 23:46:45 +0000 (18:46 -0500)]
Drop the --gtk-modules argument
We don't need it; the environment variable is enough.
Matthias Clasen [Tue, 27 Dec 2016 23:45:53 +0000 (18:45 -0500)]
Don't export gtk_get_option_group
We want to get rid of commandline option handling in GTK+.
This is a step in that direction.
Matthias Clasen [Tue, 27 Dec 2016 23:36:19 +0000 (18:36 -0500)]
Stop exporting gtk_parse_args
We want to stop handling commandline arguments, and that is the
sole purpose of this function. So it has to go
Matthias Clasen [Tue, 27 Dec 2016 23:31:03 +0000 (18:31 -0500)]
Drop gtk_init_with_args
We want to simplify our initialization code and remove all commandline
argument handling from it. The first stop for this is to reduce the
number of gtk_init variants we have.
Emmanuele Bassi [Thu, 19 Jan 2017 18:18:07 +0000 (18:18 +0000)]
gdk: Skip GdkVulkanContext methods when building introspection data
We cannot use Vulkan types through introspection anyway.
Carlos Garnacho [Thu, 19 Jan 2017 15:07:13 +0000 (16:07 +0100)]
wayland: Push NULL buffer when hiding a GdkWindow
This is how windows are meant to be hidden as per the wayland
protocol, there's no need to destroy the xdg_surface and other
interfaces.
Also, rename gdk_wayland_window_hide_surface() to clear_surface(),
as that's what it does.
https://bugzilla.gnome.org/show_bug.cgi?id=773686
Daniel Boles [Thu, 19 Jan 2017 03:26:09 +0000 (03:26 +0000)]
combobox: Avoid a pointless assignment
Don’t get the active item pointer before the grid/non-grid conditional,
because if we’re in grid mode, we re-get it before selecting it anyway.
Daniel Boles [Thu, 19 Jan 2017 03:12:32 +0000 (03:12 +0000)]
combobox: Also preselect active item in grid popup
i.e. when wrap-width > 0. This was only being done for non-grid cases.
So, ComboBoxes in grid mode did not indicate their selection when popped
up and required users to keynav from ‘nothing’ (at the top-left) to the
item they wanted to select. By selecting the active item in advance, now
it’s highlighted & acts as the starting point for keynav around the grid
Daniel Boles [Thu, 19 Jan 2017 00:44:35 +0000 (00:44 +0000)]
scale: Really fix documentation of set_digits()
This previously only mentioned its effect on the displayed value, and
even after the previous commit, its rounding of the actual value upon
change still reads like too much of an afterthought. Worse, it wasn’t
mentioned at all in the doc for the @digits parameter. Change this to
emphasise rounding always occurs and the displayed value is secondary.
Daniel Boles [Wed, 18 Jan 2017 23:42:55 +0000 (23:42 +0000)]
scale: doc: set_digits doesn’t round retroactively
Whether it should is an open question, but for now, the documentation
should clearly indicate that currently rounding is only applied upon
changes to the value, not to the existing value when ::digits changes.
This is already clear in the doc for the underlying Range::round-digits.
https://bugzilla.gnome.org/show_bug.cgi?id=358970
Daniel Boles [Wed, 18 Jan 2017 22:54:42 +0000 (22:54 +0000)]
Scale: Always sync ::digits to Range::round-digits
The documents state that gtk_scale_set_digits() “causes the value of the
adjustment to be rounded off to this number of digits, so the retrieved
value matches the value the user saw.” Note the lack of any condition.
But in fact, if draw-value was false, rounding was disabled on the base
Range, so values that weren’t displayed weren’t rounded. This made the
docs wrong and made an apparently cosmetic detail alter functionality.
Fix by ensuring the number of digits set on Scale is always propagated
along to gtk_range_set_round_digits(), thus rounding to it in all cases
when the value changes, regardless of whether the value is displayed.
This doesn’t address the other idea from Bugzilla: that changing the
number of digits should clamp the _existing_ value if it’s more precise.
This contradicts digits docs in the base Range, but the above from Scale
can be read as implying it’ll happen. For now, that’s an open question.
https://bugzilla.gnome.org/show_bug.cgi?id=358970
Daniel Boles [Wed, 18 Jan 2017 22:22:52 +0000 (22:22 +0000)]
combobox: Work around popup handler altering model
GtkFileChooserButton installs a handler for the popped-up signal, which
refilters the menu, in order to hide the “(None)” item from the popup
if it was previously selected in the ComboBox. This oddity means that:
• Until recently, this item would be selected in the menu shell, which
would then be popped up and change the selection away from that item.
This was therefore redundant (more on which below!) but benign.
• After the patch for https://bugzilla.gnome.org/show_bug.cgi?id=771242
however, this causes a critical assertion fail, as now we stash the
originally selected item in a pointer so that it can be selected only
after realisation/popup – but by that stage, the model has just been
refiltered and the previous pointer no longer refers to a valid item.
This commit works around this problem by, after popping up the menu,
getting the active item again, in case a popped-up handler has gone and
invalidated the pointer to the active item that we saved before popup.
If a handler does this, everything done to find/use the original item is
pointless. But this avoids the ugly critical in FileChooserButton, while
not harming every other ComboBox that doesn’t mess with its model while
popping up (hopefully the vast majority), and it’s very difficult to
imagine a way to check if the active item is /going to/ be hidden later)
Daniel Boles [Wed, 18 Jan 2017 22:17:37 +0000 (22:17 +0000)]
combobox: Don’t select active item if it’s hidden
I hope no one ever actually brings such a silly item into this world,
but this achieves symmetry with the similar checks immediately after.
Daniel Boles [Wed, 18 Jan 2017 21:20:10 +0000 (21:20 +0000)]
combobox: Move variables into narrowest scopes
Dušan Kazik [Wed, 18 Jan 2017 20:50:55 +0000 (20:50 +0000)]
Update Slovak translation
Benjamin Otte [Wed, 18 Jan 2017 15:46:04 +0000 (16:46 +0100)]
vulkan: Fix copy/paste error
Benjamin Otte [Wed, 18 Jan 2017 15:42:01 +0000 (16:42 +0100)]
vulkan: Add compiled shaders
I forgot to include them when adding the shaders.
Benjamin Otte [Wed, 18 Jan 2017 15:39:27 +0000 (16:39 +0100)]
vulkan: Compute right size for outset shadow
We were emitting the box and not the shadow box as the rectangle. So we
didn't draw any shadows. Oops.
Benjamin Otte [Wed, 18 Jan 2017 03:12:15 +0000 (04:12 +0100)]
css: Remove deprecated number-as-pixels compatibility
Previously, for compatibility with GTK 3.0, we allowed specifying
numbers without units and interpreted them as pixels, even when the CSS
specification didn't.
Remove that now that we can break API.